package com.sl.hx.shop.ui.home.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.ProgressBar;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sl.hx.shop.R;
import com.sl.hx.shop.bean.FlashSaleList;
import com.sl.hx.shop.bean.SearchResult;

import java.text.DecimalFormat;
import java.util.List;

public class HotListAdapter extends BaseQuickAdapter<SearchResult, BaseViewHolder> {


    public HotListAdapter(@Nullable List<SearchResult> data) {
        super(R.layout.item_hotsale, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SearchResult item) {
        ImageView imageView = helper.getView(R.id.icon);
        Glide.with(mContext).load(item.getPict_url()).apply(RequestOptions.placeholderOf(R.drawable.classify_bitmap)).into(imageView);


        helper.setText(R.id.title, item.getTitle())
                .setText(R.id.final_price, item.getZk_final_price())
                .setText(R.id.volume,item.getVolume()+"人已付款");

    }
}
